In the field of color photographing and medical imaging, recent improvement in performance of computers, mass-storage of storage devices, and reduction in cost have achieved a wide use of methods that read an image as digitized image data by use of a digital camera or image reading device, store the image in a storage device and perform appropriate image processing, and thereafter record the image data as a hard copy on a film or printing paper or visualize the image on a display device.
In recent years, improvement in performance of solid image pickup devices, such as CCD (Charge Coupled Device) image sensor or CMOS (Complementary Metal-Oxide Semiconductor) image sensors and development of application technology of these have enabled obtaining image signals having a wide dynamic range comparable to a transparent recording medium such as a film.
On the other hand, regarding image recording, in a case of a reflection type recording medium, such as printing paper or plain paper, the reproducible dynamic range is not so wide as a transparent recording medium as described above. Also, regarding image display, a dynamic range that display devices using a CRT (Cathode Ray Tube) or liquid crystal can reproduce is hardly comparable to the dynamic range of a transparent recording medium, although it depends on the illumination conditions of an environment where they are used.
It is necessary to compress a dynamic range so as to display or record an image by a display device or recording device capable of reproducing such limited a dynamic range.
As a conventional technology for such compression, a method is widely used which performs computation, such as well known smoothing filter processing, on image data so as to separate the base component being the low frequency component and the detail component being the high frequency component, compresses only the base component, and thereafter synthesize the base component with the detail component again.
To extract the base component, widely used is a method that, for each pixel, makes the average value of a target pixel and pixels within a predetermined region around the target pixel is set as the base component of the each pixel.
The detail component is generally obtained by subtracting the base component Su from a value Sf being the value of the target pixel, the value taken before image processing.
That is, representing the image data before image processing by Sf, the image data after image processing by Sp, and the base component by Sus, and setting a factor “a” to a smaller value than 1, the dynamic range of the image is compressed according to the following equation: Sp=a·Sus+(Sf−Sus). Herein, each of Sp, Sf and Sus represents entire image data in the above described equation, and the respective components are represented by Snp, Snf and Snus for representing the value of each pixel of respective image data in the description hereinafter. The character “n” is an integer starting with 1 and ending with the total number of pixels of the image.
Regarding the base component Sus, in a well known method, for the value Snf of each pixel of image data Sf before image processing, the average value of the each pixel and neighboring pixels in a predetermined region around the each pixel is assigned to the value Snus being the base component of the each pixel. However, this method has a problem, as described below, in compressing the dynamic range of an image. This will be described, referring to FIG. 2 and FIG. 3.
Horizontal axis X in FIG. 2 represents positions along a line passing through a portion T with a steep change in luminance on an original image, and vertical axis L represents the values of image data, the values representing the luminances at the above described respective positions. Such a portion with a steep change in luminance is hereinafter referred to as an edge portion. In the image data of the example shown in FIG. 2, the left side is a light portion and the right side is a dark portion, with T on X axis being the boundary. Incidentally, luminance or density is used as a unit representing the light and dark of an image, and density is generally used for an image recorded as a hardcopy on a film, printing paper or plain paper. In both of a case of reading such an image by an image reading device and a case of visually observing such an image, when an image is irradiated under certain irradiating conditions, the density and luminance of each pixel of the image has a certain relationship therebetween. Accordingly, the light and dark of an image will be described in terms of luminance.
A curve 101 in FIG. 2(a) represents values of image data, namely represents the luminance of an original image. The curve 101 is separated into a light portion 101a and a dark portion 101b, with T on X-axis being the boundary. Also in the description below, in a case of describing image data with separation between the light portion and the dark portion, the light portion will be described given “a” and the dark portion will be described given “b”, added to a symbol representing the image data.
A curve 102 in FIG. 2(b) represents the base component of image data obtained by smoothing processing, as described above. In the description below, a value of image data representing a luminance will be also referred to as a luminance value.
A curve 103 in FIG. 2(C) represents the detail component of the luminance value of the original image, and is obtained by subtracting the base component 102 from the original image data 101.
FIG. 3 illustrates the image compression method of the above described conventional technology. A curve 105 in FIG. 3(a) represents a base component after image processing obtained by multiplication of the base component Sus in FIG. 2(b) and a factor “a” smaller than 1, and the curve 103 in FIG. 3(b) represents the same detail component (Sf−Sus) as the detail component, shown in (C) of FIG. 2, of the original document.
A curve 106 (a light portion 106a or dark portion 106b) in FIG. 3(C) represents image data obtained by adding the base component 105 after image processing and the above described detail component 103. As shown by a portion 107 at the boundary between the light portion and dark portion, a portion with a high luminance value occurs which is not observed in the original image. This occurs because the base component 102 obtained by the above described image processing method, shown in FIG. 2(b), has been made dull, compared with the original base component 104 shown by an alternate long and two short dashes line, by the smoothing processing, and thus the value (Sf−Sus) in Sp=a·Sus (Sf−Sus) after image processing has become larger at the edge portion.
The portion 107 where the luminance value is large, in FIG. 3(C), is a phenomenon that appears in an actual image and is called a halo. This phenomenon will be described, referring to FIG. 4. FIG. 4(a) is a schematic diagram of a photograph before image processing, and FIG. 4(b) is a schematic diagram of a photograph which is a print out of an image obtained by performing image processing on the above described photograph, according to the above described, equation, and thereby compressing the dynamic range. FIG. 4, FIG. 6, and FIG. 8 to be referred to later are all schematic diagrams of photographs. These figures illustrate the effects of image processing on actual images, and are not aimed at indicating the levels of luminance nor quantitative spatial changes.
The photograph, in FIG. 4(a), has a gray floor of which color is closer to black, namely, the dark portion of which luminance is shown by 101b in FIG. 2(a) and a light gray wall, namely, the light portion of which luminance is shown by 101a in FIG. 2(a), and has a wide dynamic range because a light is burning at a corner of the room. Arrow X shown from the wall on the right side to the floor in FIG. 4(a) corresponds to X-axis of FIG. 2, and the position where arrow X passes through the boundary between the floor and the wall is a position T that shows the boundary between the light portion and the dark portion in FIG. 2. Likewise, also in the schematic diagrams of photographs described below, arrows X shown in the same position are corresponding to the respective vertical axes X in FIGS. 3, 5, and 7, and the wall on the right side corresponds to the respective light portions in FIGS. 3, 5 and 7, while the floor corresponds to the respective dark portions in FIGS. 3, 5 and 7.
A vicinity 107 of the portion where the wall and the floor contact with each other, the vicinity 107 being on the wall side, is lighter than other portions of the wall, and corresponds to the portion 107 in FIG. 3(C) of a high luminance.
For solution of a problem of occurrence of a halo due to a cause as described above, methods of reducing halo by synthesizing a detail with original pixel values instead of a base have been presented (Patent Document 1 for example). In Patent Document 1, an image processing method represented by the following equation is disclosed.Sproc=Sorg+f1,2(Sus)
Herein, Sproc represents an image signal after image processing, Sorg represents an image signal of an original image, and f1(Sus) and f2(Sus) represent respectively monotone decreasing functions with the value of Sus being a variable. Further, an image processing method represented by the following equation is presented (Patent Document 2 for example). That is, defining a function G as G(Sorg,Sus)=A·Sorg+B·Sus+C, the equation isSproc=Sorg+G(Sorg,Sus)=(A+1)·Sorg+B·Sus+C. 
Herein, A and C are positive real constants, and B is a negative real constant. As shown by the above described equations, these methods do not add a base component to a detail component, but add original image data to the data component, and thus it aimed at preventing occurrence of a halo.
Patent Document 1: Japanese Unexamined Patent Application Publication TOKKAI No. H6-303430
Patent Document 2: Japanese Unexamined Patent Application Publication TOKKAI No. 2002-334329